<?php
include_once "header.php";


?>

<div id="container">
	<div id="maincont">
		<?php include_once "menu_samping.php"; ?>
		<div id="mainright">
			<div id="title">
			Surat Masuk > Detil > Hapus Posisi
			</div>
			<div id="body">
			<br>	
			
			<?php
		
			if (isset ($_GET["id_peng"])){
				
				$daftar_pengiriman_nonfisik = new Daftar_pengiriman_nonfisik();
				$pengiriman = $daftar_pengiriman_nonfisik->getById($_GET["id_peng"]);
				if($daftar_pengiriman_nonfisik->delete($_GET["id_peng"])==true){
					header("Location:detil_sk.php?id=".$pengiriman->getKdSK()."");
				} else {
					echo "Tidak dapat menghapus posisi surat.";
					echo "<br>";
					echo "<br>";
					echo "<input type=\"button\" value=\"Kembali\" onClick=\"window.location.href='detil_sk.php?id=".$pengiriman->getKdSK()."'\">";
					}
				

			}
			
			?>
					
			</div>
        </div>
	</div>
</div>
<?php
	include_once "footer.php";
?>

<script type="text/javascript">
	function del(){
	if(confirm('Apakah Anda yakin akan menghapus surat ini?'))
	return true;
	else return false
	}
</script>
